<!-- HTML header for doxygen 1.8.6-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta content="text/xhtml;charset=utf-8" http-equiv="Content-Type"/>
<meta content="IE=9" http-equiv="X-UA-Compatible"/>
<meta content="Doxygen 1.8.13" name="generator"/>
<title>OpenCV: cv::BOWImgDescriptorExtractor Class Reference</title>
<link href="../../opencv.ico" rel="shortcut icon" type="image/x-icon"/>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script src="../../jquery.js" type="text/javascript"></script>
<script src="../../dynsections.js" type="text/javascript"></script>
<script src="../../tutorial-utils.js" type="text/javascript"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script src="../../search/searchdata.js" type="text/javascript"></script>
<script src="../../search/search.js" type="text/javascript"></script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js", "TeX/AMSmath.js", "TeX/AMSsymbols.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
//<![CDATA[
MathJax.Hub.Config(
{
  TeX: {
      Macros: {
          matTT: [ "\\[ \\left|\\begin{array}{ccc} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{array}\\right| \\]", 9],
          fork: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ \\end{array} \\right.", 4],
          forkthree: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ \\end{array} \\right.", 6],
          forkfour: ["\\left\\{ \\begin{array}{l l} #1 & \\mbox{#2}\\\\ #3 & \\mbox{#4}\\\\ #5 & \\mbox{#6}\\\\ #7 & \\mbox{#8}\\\\ \\end{array} \\right.", 8],
          vecthree: ["\\begin{bmatrix} #1\\\\ #2\\\\ #3 \\end{bmatrix}", 3],
          vecthreethree: ["\\begin{bmatrix} #1 & #2 & #3\\\\ #4 & #5 & #6\\\\ #7 & #8 & #9 \\end{bmatrix}", 9],
          cameramatrix: ["#1 = \\begin{bmatrix} f_x & 0 & c_x\\\\ 0 & f_y & c_y\\\\ 0 & 0 & 1 \\end{bmatrix}", 1],
          distcoeffs: ["(k_1, k_2, p_1, p_2[, k_3[, k_4, k_5, k_6 [, s_1, s_2, s_3, s_4[, \\tau_x, \\tau_y]]]]) \\text{ of 4, 5, 8, 12 or 14 elements}"],
          distcoeffsfisheye: ["(k_1, k_2, k_3, k_4)"],
          hdotsfor: ["\\dots", 1],
          mathbbm: ["\\mathbb{#1}", 1],
          bordermatrix: ["\\matrix{#1}", 1]
      }
  }
}
);
//]]>
</script><script src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js" type="text/javascript"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css"/>
<link href="../../stylesheet.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<!--#include virtual="/google-search.html"-->
<table cellpadding="0" cellspacing="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="../../opencv-logo-small.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">OpenCV
    <span id="projectnumber">4.5.2</span>
   </div>
   <div id="projectbrief">Open Source Computer Vision</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "../../search",false,'Search');
</script>
<script src="../../menudata.js" type="text/javascript"></script>
<script src="../../menu.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
  initMenu('../../',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow" onkeydown="return searchBox.OnSearchSelectKey(event)" onmouseout="return searchBox.OnSearchSelectHide()" onmouseover="return searchBox.OnSearchSelectShow()">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe frameborder="0" id="MSearchResults" name="MSearchResults" src="javascript:void(0)">
</iframe>
</div>
<div class="navpath" id="nav-path">
  <ul>
<li class="navelem"><a class="el" href="../../d2/d75/namespacecv.html">cv</a></li><li class="navelem"><a class="el" href="../../d2/d6b/classcv_1_1BOWImgDescriptorExtractor.html">BOWImgDescriptorExtractor</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> |
<a href="#pro-attribs">Protected Attributes</a> |
<a href="../../db/d81/classcv_1_1BOWImgDescriptorExtractor-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">cv::BOWImgDescriptorExtractor Class Reference<div class="ingroups"><a class="el" href="../../da/d9b/group__features2d.html">2D Features Framework</a> » <a class="el" href="../../de/d24/group__features2d__category.html">Object Categorization</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<p>Class to compute an image descriptor using the <em>bag of visual words</em>.  
 <a href="../../d2/d6b/classcv_1_1BOWImgDescriptorExtractor.html#details">More...</a></p>
<p><code>#include &lt;opencv2/features2d.hpp&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a1fd114a5108edb9d33674d8433ff12ec"><td align="right" class="memItemLeft" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d6b/classcv_1_1BOWImgDescriptorExtractor.html#a1fd114a5108edb9d33674d8433ff12ec">BOWImgDescriptorExtractor</a> (const <a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; <a class="el" href="../../da/d9b/group__features2d.html#gadd5cf7c76865f14468cfdd9cc08eb990">DescriptorExtractor</a> &gt; &amp;<a class="el" href="../../d2/d6b/classcv_1_1BOWImgDescriptorExtractor.html#acd0f100ac2f377432931062ce02f16cb">dextractor</a>, const <a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; <a class="el" href="../../db/d39/classcv_1_1DescriptorMatcher.html">DescriptorMatcher</a> &gt; &amp;<a class="el" href="../../d2/d6b/classcv_1_1BOWImgDescriptorExtractor.html#a43311e57fce860293560e05a7e933424">dmatcher</a>)</td></tr>
<tr class="memdesc:a1fd114a5108edb9d33674d8433ff12ec"><td class="mdescLeft"> </td><td class="mdescRight">The constructor.  <a href="#a1fd114a5108edb9d33674d8433ff12ec">More...</a><br/></td></tr>
<tr class="separator:a1fd114a5108edb9d33674d8433ff12ec"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:aa37f98c0c292cfb0e9ec23ef4fbb11c1"><td align="right" class="memItemLeft" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d6b/classcv_1_1BOWImgDescriptorExtractor.html#aa37f98c0c292cfb0e9ec23ef4fbb11c1">BOWImgDescriptorExtractor</a> (const <a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; <a class="el" href="../../db/d39/classcv_1_1DescriptorMatcher.html">DescriptorMatcher</a> &gt; &amp;<a class="el" href="../../d2/d6b/classcv_1_1BOWImgDescriptorExtractor.html#a43311e57fce860293560e05a7e933424">dmatcher</a>)</td></tr>
<tr class="separator:aa37f98c0c292cfb0e9ec23ef4fbb11c1"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:abb3697d34894371e4811da4716e4f111"><td align="right" class="memItemLeft" valign="top">virtual </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d6b/classcv_1_1BOWImgDescriptorExtractor.html#abb3697d34894371e4811da4716e4f111">~BOWImgDescriptorExtractor</a> ()</td></tr>
<tr class="separator:abb3697d34894371e4811da4716e4f111"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ac4e1019795995a9395aded0a9c1c3ed6"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d6b/classcv_1_1BOWImgDescriptorExtractor.html#ac4e1019795995a9395aded0a9c1c3ed6">compute</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> image, std::vector&lt; <a class="el" href="../../d2/d29/classcv_1_1KeyPoint.html">KeyPoint</a> &gt; &amp;keypoints, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> imgDescriptor, std::vector&lt; std::vector&lt; int &gt; &gt; *pointIdxsOfClusters=0, <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> *descriptors=0)</td></tr>
<tr class="memdesc:ac4e1019795995a9395aded0a9c1c3ed6"><td class="mdescLeft"> </td><td class="mdescRight">Computes an image descriptor using the set visual vocabulary.  <a href="#ac4e1019795995a9395aded0a9c1c3ed6">More...</a><br/></td></tr>
<tr class="separator:ac4e1019795995a9395aded0a9c1c3ed6"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ad6fd3ce0bbe507644c0979178f2384f4"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d6b/classcv_1_1BOWImgDescriptorExtractor.html#ad6fd3ce0bbe507644c0979178f2384f4">compute</a> (<a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> keypointDescriptors, <a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> imgDescriptor, std::vector&lt; std::vector&lt; int &gt; &gt; *pointIdxsOfClusters=0)</td></tr>
<tr class="separator:ad6fd3ce0bbe507644c0979178f2384f4"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a2c3540b57b4f74b4e87778e3cb338bb0"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d6b/classcv_1_1BOWImgDescriptorExtractor.html#a2c3540b57b4f74b4e87778e3cb338bb0">compute2</a> (const <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp;image, std::vector&lt; <a class="el" href="../../d2/d29/classcv_1_1KeyPoint.html">KeyPoint</a> &gt; &amp;keypoints, <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp;imgDescriptor)</td></tr>
<tr class="separator:a2c3540b57b4f74b4e87778e3cb338bb0"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a0f41a68e3326e1bffd2f32aa64a9871d"><td align="right" class="memItemLeft" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d6b/classcv_1_1BOWImgDescriptorExtractor.html#a0f41a68e3326e1bffd2f32aa64a9871d">descriptorSize</a> () const</td></tr>
<tr class="memdesc:a0f41a68e3326e1bffd2f32aa64a9871d"><td class="mdescLeft"> </td><td class="mdescRight">Returns an image descriptor size if the vocabulary is set. Otherwise, it returns 0.  <a href="#a0f41a68e3326e1bffd2f32aa64a9871d">More...</a><br/></td></tr>
<tr class="separator:a0f41a68e3326e1bffd2f32aa64a9871d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a4abb4c684a25f843b2f033f2bc7f52eb"><td align="right" class="memItemLeft" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d6b/classcv_1_1BOWImgDescriptorExtractor.html#a4abb4c684a25f843b2f033f2bc7f52eb">descriptorType</a> () const</td></tr>
<tr class="memdesc:a4abb4c684a25f843b2f033f2bc7f52eb"><td class="mdescLeft"> </td><td class="mdescRight">Returns an image descriptor type.  <a href="#a4abb4c684a25f843b2f033f2bc7f52eb">More...</a><br/></td></tr>
<tr class="separator:a4abb4c684a25f843b2f033f2bc7f52eb"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a4fdfe378202ce308eb36a4692c4f6f38"><td align="right" class="memItemLeft" valign="top">const <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp; </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d6b/classcv_1_1BOWImgDescriptorExtractor.html#a4fdfe378202ce308eb36a4692c4f6f38">getVocabulary</a> () const</td></tr>
<tr class="memdesc:a4fdfe378202ce308eb36a4692c4f6f38"><td class="mdescLeft"> </td><td class="mdescRight">Returns the set vocabulary.  <a href="#a4fdfe378202ce308eb36a4692c4f6f38">More...</a><br/></td></tr>
<tr class="separator:a4fdfe378202ce308eb36a4692c4f6f38"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a9d8425d78fc4e81991a80e471d6089e6"><td align="right" class="memItemLeft" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d6b/classcv_1_1BOWImgDescriptorExtractor.html#a9d8425d78fc4e81991a80e471d6089e6">setVocabulary</a> (const <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp;<a class="el" href="../../d2/d6b/classcv_1_1BOWImgDescriptorExtractor.html#ab5753a53d4f4c6e2c18b61e1b4559b98">vocabulary</a>)</td></tr>
<tr class="memdesc:a9d8425d78fc4e81991a80e471d6089e6"><td class="mdescLeft"> </td><td class="mdescRight">Sets a visual vocabulary.  <a href="#a9d8425d78fc4e81991a80e471d6089e6">More...</a><br/></td></tr>
<tr class="separator:a9d8425d78fc4e81991a80e471d6089e6"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr class="memitem:acd0f100ac2f377432931062ce02f16cb"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; <a class="el" href="../../da/d9b/group__features2d.html#gadd5cf7c76865f14468cfdd9cc08eb990">DescriptorExtractor</a> &gt; </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d6b/classcv_1_1BOWImgDescriptorExtractor.html#acd0f100ac2f377432931062ce02f16cb">dextractor</a></td></tr>
<tr class="separator:acd0f100ac2f377432931062ce02f16cb"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:a43311e57fce860293560e05a7e933424"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; <a class="el" href="../../db/d39/classcv_1_1DescriptorMatcher.html">DescriptorMatcher</a> &gt; </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d6b/classcv_1_1BOWImgDescriptorExtractor.html#a43311e57fce860293560e05a7e933424">dmatcher</a></td></tr>
<tr class="separator:a43311e57fce860293560e05a7e933424"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ab5753a53d4f4c6e2c18b61e1b4559b98"><td align="right" class="memItemLeft" valign="top"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d6b/classcv_1_1BOWImgDescriptorExtractor.html#ab5753a53d4f4c6e2c18b61e1b4559b98">vocabulary</a></td></tr>
<tr class="separator:ab5753a53d4f4c6e2c18b61e1b4559b98"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<a id="details" name="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Class to compute an image descriptor using the <em>bag of visual words</em>. </p>
<p>Such a computation consists of the following steps:</p>
<ol type="1">
<li>Compute descriptors for a given image and its keypoints set.</li>
<li>Find the nearest visual words from the vocabulary for each keypoint descriptor.</li>
<li>Compute the bag-of-words image descriptor as is a normalized histogram of vocabulary words encountered in the image. The i-th bin of the histogram is a frequency of i-th word of the vocabulary in the given image. </li>
</ol>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a1fd114a5108edb9d33674d8433ff12ec"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1fd114a5108edb9d33674d8433ff12ec">◆ </a></span>BOWImgDescriptorExtractor() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cv::BOWImgDescriptorExtractor::BOWImgDescriptorExtractor </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; <a class="el" href="../../da/d9b/group__features2d.html#gadd5cf7c76865f14468cfdd9cc08eb990">DescriptorExtractor</a> &gt; &amp; </td>
          <td class="paramname"><em>dextractor</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; <a class="el" href="../../db/d39/classcv_1_1DescriptorMatcher.html">DescriptorMatcher</a> &gt; &amp; </td>
          <td class="paramname"><em>dmatcher</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>&lt;BOWImgDescriptorExtractor object&gt;</td><td>=</td><td>cv.BOWImgDescriptorExtractor(</td><td class="paramname">dextractor, dmatcher</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>The constructor. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dextractor</td><td>Descriptor extractor that is used to compute descriptors for an input image and its keypoints. </td></tr>
    <tr><td class="paramname">dmatcher</td><td>Descriptor matcher that is used to find the nearest word of the trained vocabulary for each keypoint descriptor of the image. </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
<a id="aa37f98c0c292cfb0e9ec23ef4fbb11c1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa37f98c0c292cfb0e9ec23ef4fbb11c1">◆ </a></span>BOWImgDescriptorExtractor() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">cv::BOWImgDescriptorExtractor::BOWImgDescriptorExtractor </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt; <a class="el" href="../../db/d39/classcv_1_1DescriptorMatcher.html">DescriptorMatcher</a> &gt; &amp; </td>
          <td class="paramname"><em>dmatcher</em></td><td>)</td>
          <td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>&lt;BOWImgDescriptorExtractor object&gt;</td><td>=</td><td>cv.BOWImgDescriptorExtractor(</td><td class="paramname">dextractor, dmatcher</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p>
</div>
</div>
<a id="abb3697d34894371e4811da4716e4f111"></a>
<h2 class="memtitle"><span class="permalink"><a href="#abb3697d34894371e4811da4716e4f111">◆ </a></span>~BOWImgDescriptorExtractor()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual cv::BOWImgDescriptorExtractor::~BOWImgDescriptorExtractor </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="ac4e1019795995a9395aded0a9c1c3ed6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac4e1019795995a9395aded0a9c1c3ed6">◆ </a></span>compute() <span class="overload">[1/2]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::BOWImgDescriptorExtractor::compute </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>image</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::vector&lt; <a class="el" href="../../d2/d29/classcv_1_1KeyPoint.html">KeyPoint</a> &gt; &amp; </td>
          <td class="paramname"><em>keypoints</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>imgDescriptor</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::vector&lt; std::vector&lt; int &gt; &gt; * </td>
          <td class="paramname"><em>pointIdxsOfClusters</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> * </td>
          <td class="paramname"><em>descriptors</em> = <code>0</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Computes an image descriptor using the set visual vocabulary. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">image</td><td>Image, for which the descriptor is computed. </td></tr>
    <tr><td class="paramname">keypoints</td><td>Keypoints detected in the input image. </td></tr>
    <tr><td class="paramname">imgDescriptor</td><td>Computed output image descriptor. </td></tr>
    <tr><td class="paramname">pointIdxsOfClusters</td><td>Indices of keypoints that belong to the cluster. This means that pointIdxsOfClusters[i] are keypoint indices that belong to the i -th cluster (word of vocabulary) returned if it is non-zero. </td></tr>
    <tr><td class="paramname">descriptors</td><td>Descriptors of the image keypoints that are returned if they are non-zero. </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
<a id="ad6fd3ce0bbe507644c0979178f2384f4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad6fd3ce0bbe507644c0979178f2384f4">◆ </a></span>compute() <span class="overload">[2/2]</span></h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::BOWImgDescriptorExtractor::compute </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#ga353a9de602fe76c709e12074a6f362ba">InputArray</a> </td>
          <td class="paramname"><em>keypointDescriptors</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../dc/d84/group__core__basic.html#gaad17fda1d0f0d1ee069aebb1df2913c0">OutputArray</a> </td>
          <td class="paramname"><em>imgDescriptor</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::vector&lt; std::vector&lt; int &gt; &gt; * </td>
          <td class="paramname"><em>pointIdxsOfClusters</em> = <code>0</code> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. </p><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">keypointDescriptors</td><td>Computed descriptors to match with vocabulary. </td></tr>
    <tr><td class="paramname">imgDescriptor</td><td>Computed output image descriptor. </td></tr>
    <tr><td class="paramname">pointIdxsOfClusters</td><td>Indices of keypoints that belong to the cluster. This means that pointIdxsOfClusters[i] are keypoint indices that belong to the i -th cluster (word of vocabulary) returned if it is non-zero. </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
<a id="a2c3540b57b4f74b4e87778e3cb338bb0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2c3540b57b4f74b4e87778e3cb338bb0">◆ </a></span>compute2()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void cv::BOWImgDescriptorExtractor::compute2 </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp; </td>
          <td class="paramname"><em>image</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">std::vector&lt; <a class="el" href="../../d2/d29/classcv_1_1KeyPoint.html">KeyPoint</a> &gt; &amp; </td>
          <td class="paramname"><em>keypoints</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp; </td>
          <td class="paramname"><em>imgDescriptor</em> </td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>imgDescriptor</td><td>=</td><td>cv.BOWImgDescriptorExtractor.compute(</td><td class="paramname">image, keypoints[, imgDescriptor]</td><td>)</td></tr></table>
</div><div class="memdoc">
</div>
</div>
<a id="a0f41a68e3326e1bffd2f32aa64a9871d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0f41a68e3326e1bffd2f32aa64a9871d">◆ </a></span>descriptorSize()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int cv::BOWImgDescriptorExtractor::descriptorSize </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.BOWImgDescriptorExtractor.descriptorSize(</td><td class="paramname"></td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Returns an image descriptor size if the vocabulary is set. Otherwise, it returns 0. </p>
</div>
</div>
<a id="a4abb4c684a25f843b2f033f2bc7f52eb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4abb4c684a25f843b2f033f2bc7f52eb">◆ </a></span>descriptorType()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int cv::BOWImgDescriptorExtractor::descriptorType </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.BOWImgDescriptorExtractor.descriptorType(</td><td class="paramname"></td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Returns an image descriptor type. </p>
</div>
</div>
<a id="a4fdfe378202ce308eb36a4692c4f6f38"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4fdfe378202ce308eb36a4692c4f6f38">◆ </a></span>getVocabulary()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a>&amp; cv::BOWImgDescriptorExtractor::getVocabulary </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>retval</td><td>=</td><td>cv.BOWImgDescriptorExtractor.getVocabulary(</td><td class="paramname"></td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Returns the set vocabulary. </p>
</div>
</div>
<a id="a9d8425d78fc4e81991a80e471d6089e6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9d8425d78fc4e81991a80e471d6089e6">◆ </a></span>setVocabulary()</h2>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void cv::BOWImgDescriptorExtractor::setVocabulary </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> &amp; </td>
          <td class="paramname"><em>vocabulary</em></td><td>)</td>
          <td></td>
        </tr>
      </table><table class="python_language"><tr><th colspan="999" style="text-align:left">Python:</th></tr><tr><td style="width: 20px;"></td><td>None</td><td>=</td><td>cv.BOWImgDescriptorExtractor.setVocabulary(</td><td class="paramname">vocabulary</td><td>)</td></tr></table>
</div><div class="memdoc">
<p>Sets a visual vocabulary. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">vocabulary</td><td>Vocabulary (can be trained using the inheritor of <a class="el" href="../../d5/d14/classcv_1_1BOWTrainer.html" title="Abstract base class for training the bag of visual words vocabulary from a set of descriptors...">BOWTrainer</a> ). Each row of the vocabulary is a visual word (cluster center). </td></tr>
  </table>
  </dd>
</dl>
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a id="acd0f100ac2f377432931062ce02f16cb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acd0f100ac2f377432931062ce02f16cb">◆ </a></span>dextractor</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt;<a class="el" href="../../da/d9b/group__features2d.html#gadd5cf7c76865f14468cfdd9cc08eb990">DescriptorExtractor</a>&gt; cv::BOWImgDescriptorExtractor::dextractor</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="a43311e57fce860293560e05a7e933424"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a43311e57fce860293560e05a7e933424">◆ </a></span>dmatcher</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../dc/d84/group__core__basic.html#ga6395ca871a678020c4a31fadf7e8cc63">Ptr</a>&lt;<a class="el" href="../../db/d39/classcv_1_1DescriptorMatcher.html">DescriptorMatcher</a>&gt; cv::BOWImgDescriptorExtractor::dmatcher</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="ab5753a53d4f4c6e2c18b61e1b4559b98"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab5753a53d4f4c6e2c18b61e1b4559b98">◆ </a></span>vocabulary</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d3/d63/classcv_1_1Mat.html">Mat</a> cv::BOWImgDescriptorExtractor::vocabulary</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>opencv2/<a class="el" href="../../d5/d0d/features2d_8hpp.html">features2d.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.6-->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Apr 2 2021 11:36:42 for OpenCV by  <a href="http://www.doxygen.org/index.html">
<img alt="doxygen" class="footer" src="../../doxygen.png"/>
</a> 1.8.13
</small></address>
<script type="text/javascript">
//<![CDATA[
addTutorialsButtons();
//]]>
</script>
</body>
</html>
